package com.frkj.yuan.activity;
import android.text.SpannableString;
import android.widget.TextView;

import androidx.core.content.ContextCompat;

import com.frkj.yuan.R;
import com.frkj.yuan.base.BaseActivity;
import com.frkj.yuan.utils.FullScreenUtils;

import butterknife.BindView;
import butterknife.OnClick;
import cn.ycbjie.ycstatusbarlib.bar.YCAppBar;

/**
 * 作者：菲菲 on 2021/11/9 16:31
 * <p>用户协议
 * company：中星电子
 */
public class ProtocolActivity extends BaseActivity {
    @BindView(R.id.base_title)
    TextView mTitleMsg;
    @BindView(R.id.tv_protocl)
    TextView mProtocolName;
    @OnClick(R.id.base_back)
    public void OnClick() {
        finishWitchAnimation();
    }
    @Override
    public int getLayoutId() {
        return R.layout.activity_protocol_view;
    }
    @Override
    public void initLayoutView() {
        FullScreenUtils.getInstance().fullScreen(ProtocolActivity.this,true);
        String protocol= getIntent().getStringExtra("xieyi");
        if (protocol!=null&&!protocol.equals("")){
            if (protocol.equals("1")){
                mTitleMsg.setText("用户协议");
                SpannableString spannableString = new SpannableString(getResources().getString(R.string.protocl));
                mProtocolName.setText(spannableString);
            }else if (protocol.equals("2")){
                mTitleMsg.setText("服务协议");
                SpannableString spannableString = new SpannableString(getResources().getString(R.string.service));
                mProtocolName.setText(spannableString);

            }else if (protocol.equals("3")){
                mTitleMsg.setText("用户授权协议");
                SpannableString spannableString = new SpannableString(getResources().getString(R.string.shouquan));
                mProtocolName.setText(spannableString);
            }else if (protocol.equals("4")){
                mTitleMsg.setText("隐私政策");
                SpannableString spannableString = new SpannableString(getResources().getString(R.string.privacy_tips));
                mProtocolName.setText(spannableString);

            }
        }

    }
}
